<template>
	<view>
		<view style="display: flex;justify-content: center;font-size:larger;">{{messageRecord.messageRecordTitle}}</view>
		<view style="height: 50rpx;"></view>
		<view style="display: flex;justify-content: center;font-size: x-small;">{{messageRecord.sendNickname}}|{{messageRecord.messageRecordTime}}</view>
		<view style="height: 100rpx;"></view>
		<view style="display: flex;justify-content: center;">{{messageRecord.messageRecordContent}}</view>
	</view>
</template>

<script>
	import base from '@/common/base.js'
	export default {
		data() {
			return {
				messageRecord:[]
			}
		},
		onLoad(options) {
			this.getMessageRecordById(options.messageRecordId);
		},
		onBackPress() {
			let pages = getCurrentPages();
			let page = pages[pages.length-2];
			page.onLoad();
		},
		methods: {
			getMessageRecordById(messageRecordId){
				uni.request({
					url:base.urlPrefix+'yoga_app/message-record/coachGetMessageRecordById',
					data:{
						messageRecordId:messageRecordId
					},
					success: (res) => {
						this.messageRecord=res.data.object;
					}
				})
			}
		}
	}
</script>

<style>
</style>
